#! /bin/sh

if [ -z "$1" -o -n "$2" ]; then
   echo "Usage: $0 new_tag" >&2
   exit 1
else
   tag="$1"
fi

. `dirname $0`/split_tag.sh &&
split_tag $tag

if [ $micro -eq 0 -o \( $state != final -a $state != post \) ]; then
   git checkout master
else
   git checkout maint
fi &&

exec git tag --message="Release $tag" --sign $tag
